{% extends "template/listEdit.volt" %}

{% block title %}用户管理{% endblock %}


{% block filter %}
    <div class="col-md-4 col-sm-6 col-xs-12">
        <table>
            <tr>
                <th>ID:</th>
                <td><input type="text" name="id" value=""></td>
            </tr>
        </table>
    </div>
    <div class="col-md-4 col-sm-6 col-xs-12">
        <table>
            <tr>
                <th>工作名称:</th>
                <td><input type="text" name="work_name" value=""></td>
            </tr>
        </table>
    </div>
    <div class="col-md-4 col-sm-6 col-xs-12">
        <table>
            <tr>
                <th>创建时间:</th>
                <td><input type="date-h" name="created_at_start" data-attr="date"
                           value="">-<input type="date-h" name="created_at_end" data-attr="date right" class="end"
                                            value=""></td>
            </tr>
            <tr>
                <td colspan="2">
                    <div id="btn_reset_param" class="btn-0 button">重 置</div>
                    <div id="btn_search_data" class="btn-1 button">过 滤</div>
                </td>
            </tr>
        </table>
    </div>
{% endblock %}

{% block hiddenOperation %}hidden{% endblock %}

{% block jscontent %}
    <script>

        function actionDelete(tag) {
            var result = confirm("您确定删除该记录?");
            if (result) {
                $.post("/subsystem/doDelete", {
                    "id": tag
                }, function (result) {

                    PageDataProxy.refresh();
                });
            }

        }


        $(function () {
            PageDataProxy.init({
                "action_detail_url":"/task/addDispatchTask",
                "url": "/task/list",
                "table_id": "#mytable",
                "page_control_id": "#data-wrap",
                "page_size_id": "#rows-perpage-select",
                "page_total_id": "#data_count_total",
                "use_check_box": false,
                "data_field_process": function (name, value) {
                    if (name == "company") {
                        return PageDataProxy.formatShortContent(value, 18);
                    }
                    if(name=='id'){

                        value="<a href='javascript:void(0)' onclick=PageDataProxy.actionDetail('work_id=" + value + "')>"+value+"</a>";
                    }
                    return value;
                },
                "table_style": {
                    "permission_local_gps":"width-150",
                    "permission_p40":"width-150",
                    "video_route":"width-150",
                    "id": "width-s",
                    "nickname": "width-m",
                    "phone": "width-m",
                    "company": "width-b",
                    "created_at": "width-m",
                    "work_name":"width-b"
                },
                "operation_style": "width: 100px; min-width: 100px;",
                "data_field_action_process": function (tag) {
                    return "<td onclick=PageDataProxy.actionDetail('work_id=" + tag + "')><img class='action-show-icon'>详细</td>";
                    //return "<td onclick='actionDetail(" + tag + ")'><img class='action-show-icon'>详细</td>";
                },

            });


        })
    </script>
{% endblock %}